<body>
<div class="path fn-clear"><span class="fb">首页</span><a href="{url('channel/index')}">栏目管理</a>{$path}</div>
{if $info['type'] <> 2}    
<div class="button-nav">
<a href="{url('channel/add',array(id=>$pid))}" class="button button-blank link" title="添加栏目"><i class="iconfont" title="添加栏目">&#xF023;</i> 添加栏目</a>
</div>
{/if}
<div class="m5">
<table class="table table-bordered table-striped" width="100%">
<thead>
    <tr>
        <th class="fn-tac w20">#</th>
        <th class="fn-tac w80">资源模型</th>
        <th class="fn-tal">分类名称</th>
        <th class="fn-tac w60">扩展模型</th>
        <th class="fn-tac w60">栏目模型</th>
        <th class="fn-tac w60">频道类型</th>
        <th class="fn-tac w80">更新时间</th>
        {if !$pid}<th class="fn-tac w60">站点ID</th>{/if}
        <th class="fn-tac w60">排序</th>
        <th class="fn-tac w140">操作</th>
    </tr>
</thead>
<tbody>
{loop $list $vo}
<tr>
    <td class="fn-tac">{$vo['id']}</td>
    <td class="fn-tac"><a title="模型字段" href="{url('module/field',array(id=>$vo['mid']))}">{$vo['model_name']}</a></td>
    <td>{if $vo['type'] == 2}{$vo['name']}(URL){else}<a title="查看子分类" href="{url('channel/index',array(id=>$vo['id']))}">{$vo['name']}<a/>{/if}</td>
    <td class="fn-tac">{if $vo['plus_mid'] > 0}<span class="red">是</span>{else}<span class="gray">否</span>{/if}</td>
    <td class="fn-tac">{if $vo['exts_mid'] > 0}<span class="red">是</span>{else}<span class="gray">否</span>{/if}</td>
    <td class="fn-tac gray">{if $vo['type'] == 1}<span class="green">频道</span>{elseif $vo['type'] == 2}链接{else}<span class="red">内容</span>{/if}</td>
    <td class="fn-tac">{date('Y-m-d',$vo['uptime'])}</td>
    {if !$pid}<td class="fn-tac">{$vo['language']}</td>{/if}
    <td class="fn-tac"><input name="sorter" class="input fn-tac w30" type="text" value="{$vo['neworder']}" fid="{$vo['id']}" /></td>
    <td class="fn-tac tip">
        <a href="{url('channel/edit',array(id=>$vo['id'],pid=>$vo['pid']))}" class="blue" title="编辑">编辑</a>/{if $vo['type'] == 2}
            <a class="blue" title="点击参看栏目内容" href="{$vo['url']}" target="_blank">预览</a>/{else}<a class="blue" title="点击参看栏目内容" href="{url('default/index/channel',array(cid=>$vo['id']))}" target="_blank">预览</a>/
        {/if}<a href="###" class="del" title="删除" url="{url('channel/index',array(id=>$vo['id'],act=>del))}">删除</a>
    </td>
</tr>
{/loop}
</tbody>
</table>
</div>
<div id="page" class="right m5">{$page}</div>
<script language="javascript">
Do('base','Dialog',function(){
    $("input[name='sorter']").blur(function(){
        var id = $(this).attr('fid');
        var sid = $(this).val();
        $.post('{url('channel/uporter')}',{id:id,sorter:sid})
    });
    $('.del').click(function(){
        $(this).cpDelete();
    });
})
</script>
</body>